<style>
.ricon {
	float:right;margin-right:30px;color:#ffa131;
}
.userinfo {
    margin-top:40px;
}
.userimg{
    margin-top:30px;
}
.userinfo p strong{
    color:#fff;
}
.userinfo h3 strong{
    color:#fff;
}
.userinfo h2 span{
    background-color:#e6207a;
}
.mainicon ul li .nb{
    border-color:#e6207a ;
    color:#e6207a;
}
</style>

<section class="headers clearfix" id="header" style="height: 180.28125px; background-image: url('<?php echo C("UPYUN_DOMAIN");?><?php echo C('USER_BANNER');?>!/fw/640');">
		<div class="headerModule clearfix">
			<div class="userimg fl">
                            <img id="headimg" src="<?php echo $memberinfo['headimgurl'] ? $memberinfo['headimgurl'] : '__STATIC__mobile/images/userimg.png';?>" alt=""  onerror="javascript:this.src='__STATIC__mobile/images/userimg.png';">
                                <input id="file" style="display:none" name="file" type="file"/>
				</div>
			<div class="userinfo fl" id="userinfo" style="width: 65%;">
				<h2 class="clearfix">
					<strong class="fl">账号ID：<?php echo $memberinfo['uid'];?></strong>
				</h2>
				<h2 class="clearfix">
					<strong class="fl"><?php echo $memberinfo['realname'] ? $memberinfo['realname'] : $memberinfo['nickname'];?></strong><span class="fl"><?php echo $user_grade;?></span>
				</h2>
				<?php if($memberinfo['refer_uid']){?>
				<p style="width: 100%;overflow: hidden;">我的伯乐：<strong><?php echo $refer['realname'];?> (ID:<?php echo $memberinfo['refer_uid'];?>)</strong></p>
                                <!-- <p style="width: 100%;overflow: hidden;">伯乐手机号：<strong><?php echo $refer['mobile'];?></strong></p> -->

                                <?php } ?>
				<h3>
<!--				锁定<?php echo C("YONGJIN_NAME");?>：<strong class="points"><?php echo $memberinfo['locked_money'];?></strong>
				可用<?php echo C("YONGJIN_NAME");?>:<strong class="points"><?php echo $memberinfo['money'];?></strong>
                                <br>
				<?php echo C("CASH_NAME");?>:<strong class="points"><?php echo $memberinfo['cash_money'];?></strong>-->
                                
                                <?php if($memberinfo['mobile']){?>
                                <!-- 手机:<strong class="points"><?php echo $memberinfo['mobile'];?></strong> -->
                                <?php } ?>
                                </h3>
			</div>
			
			<!-- 
			<div class="webmsg fr">
				<p class="msgnum">
					<a href="#" class="mail"><img
						src="__STATIC__mobile/images/mailbg.png" width="20" alt=""></a>
				</p>
			</div>
			 -->
			
		</div>
	</section>

<script>
    $(document).ready(function(){
		
        var UPYUN_DOMAIN = "<?php echo C('UPYUN_DOMAIN');?>";
        //选择图片上传
        $("#headimg").on('click', function(){
            $('#file').click();
        });
        $('#file').on('change',function(){
            layer.open({
                type: 2
                ,content: '上传中，请稍等'
            });
            var file = $(this)[0].files[0];
            var formData = new FormData();
            formData.append('file',file);
            $.ajax({
                url: '/mobile/user/downloadpic?dtype=headimg',
                type: 'post',
                data: formData,
                processData: false,
                contentType: false
            })
            .done(function(res){
                $('#headimg').attr('src',UPYUN_DOMAIN+res.data);
                 layer.closeAll();
            })
            .fail(function(){
                layer.closeAll();
            })
        });
    });
</script>